

<?php
include('lock.php');

#$sql = "select event_ID,event_name from events where start_date >= now()";
$sql ="select * from user_event eu,events e where eu.event_ID = e.event_ID and eu.username = '$login_session' and e.start_date >= now() group by e.event_name";
$result=mysql_query($sql);

?>





<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title> View Events </title>
</head>

<body> 
<img src="/infinity/img/infinity3.jpg" alt="Infinity" width="200" height="100"/>
<h1>View Events</h1>
<div id="layout_1">
 <div id="content" class=".">

<table border="1">
   <tr>
  <th>Event Name</th>
  <th>Starting Date</th>
  <th>Ending Date </th>
  <th>Event Catagory </th>
  <th>Address </th>		
 </tr>
	<?php
                    while ($db_field = mysql_fetch_assoc($result)) {
                          //$event_id = $db_field['event_ID'];
                          $event_name = $db_field['event_name'];
			  $start_date = $db_field['start_date'];
			  $end_date = $db_field['end_date'];
			  $event_cat = $db_field['event_cat'];
			  $address = $db_field['address'];
                         echo '<tr><td>'.$event_name.'</td><td>'.$start_date.'</td><td>'.$end_date.'</td><td>'.$event_cat.'</td><td>'.$address.'</td></tr>';
                         } ?>



 <tr>
		<font color="White"><a href="/infinity/welcome.php">Back to Welcome Page</a></font>

 </tr>
 </table>
</form>

 </div>
 <div class="cleaner">&nbsp;</div>
</div>
</div>
</body>
</html>
